package io.renren.modules.app.controller;


import io.renren.common.result.Result;
import io.renren.modules.medical.service.PatientBasicInformationService;
import io.renren.modules.medical.vo.medicalVo.PatientNameAndIdVo;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Luo Sheng
 * @school YiBin university
 * @create 2023-05-22 11:32
 */
@RestController
@RequestMapping("/app/patientInfo")
@RequiredArgsConstructor
public class PatientInfoApi {
    private final PatientBasicInformationService patientBasicInformationService;
    // 获取到用户id、姓名、手机号、身份证号
    @GetMapping("/common")
    public Result<PatientNameAndIdVo> getPatientCommonInfo(){
        PatientNameAndIdVo patientCommonInfo = patientBasicInformationService.getCommonInfo();
        return Result.success(patientCommonInfo);
    }
}
